﻿using ConceptsFramework.ConceptResults;

namespace ConceptsFramework.ConceptsQueryEngine
{
    public class ComposedQueryHolder : AbstractQueryHolder
    {
        private AbstractQueryHolder LeftQueryHolder { get; set; }
        private AbstractQueryHolder RightQueryHolder { get; set; }
        
        public ComposedQueryHolder(AbstractQueryHolder leftQueryHolder, AbstractQueryHolder rightQueryHolder)
        {
            LeftQueryHolder = leftQueryHolder;
            RightQueryHolder = rightQueryHolder;
        }

        public override ResultSet Query(ResultSet inputSet)
        {
            return (LeftQueryHolder.Query(RightQueryHolder.Query(inputSet)));
        }
    }
}
